// 经费结算
import request from "@/api/request";

// 分页查询经费结算
export const query_finanCial = (params) => {
  return request({
    url: "/fundmanage/fc/selectAll",
    method: "post",
    data: params,
    //   headers: { "Content-Type": "application/json" },
  });
};

//   删除经费结算单
export const delete_finanCial = (params) => {
  return request({
    url: "/fundmanage/fc/delete/" + params,
    method: "post",
    //   data: params,
    //   headers: { "Content-Type": "application/json" },
  });
};

//   新增经费结算单
export const add_finanCial = (params) => {
  return request({
    url: "/fundmanage/fc/insert",
    method: "post",
    data: params,
    headers: { "Content-Type": "application/json" },
  });
};

//   查询详情
export const details_finanCial = (params) => {
  return request({
    url: "/fundmanage/fc/selectDetails/" + params,
    method: "post",
    //   data: params,
    //   headers: { "Content-Type": "application/json" },
  });
};

//   修改
export const update_finanCial = (params) => {
  return request({
    url: "/fundmanage/fc/update",
    method: "post",
    data: params,
    headers: { "Content-Type": "application/json" },
  });
};

//   获取部门列表
export const get_departmentList = () => {
  return request({
    url: "/fundmanage/fc/orgList",
    method: "post",
    //   headers: { "Content-Type": "application/json" },
  });
};

//   获取费用类别
export const get_costCategory = () => {
  return request({
    url: "/fundmanage/fcc/selectIdName",
    method: "post",
    //   headers: { "Content-Type": "application/json" },
  });
};

//   查询来源单号
export const query_sourceOrderNumber = (params) => {
  return request({
    url: `/fundmanage/fc/selectFFOrNum/${params}`,
    method: "post",
    // data: params,
  });
};

//   提交单据
export const commit_cial = (params) => {
  return request({
    url: "/fundmanage/fc/commit",
    method: "post",
    data: params,
    headers: { "Content-Type": "application/json" },
  });
};

// 回退单据
export const undo_cial = (params) => {
  return request({
    url: "/fundmanage/fc/undo",
    method: "post",
    data: params,
    //   headers: { "Content-Type": "application/json" },
  });
};

//   审核单据
export const audit_cial = (params) => {
  return request({
    url: "/fundmanage/fc/audit",
    method: "post",
    data: params,
    headers: { "Content-Type": "application/json" },
  });
};

//   获取审核历史
export const history_cial = (params) => {
  return request({
    url: "/fundmanage/fc/getAuditHistory",
    method: "post",
    data: params,
    //   headers: { "Content-Type": "application/json" },
  });
};

//   作废单据
export const cancel_cial = (params) => {
  return request({
    url: "/fundmanage/fc/cancel",
    method: "post",
    data: params,
    //   headers: { "Content-Type": "application/json" },
  });
};


// 上传附件
export const upload_cial = (params) => {
  return request({
    url: "/fundmanage/fundAcc/upload",
    method: "post",
    data: params,
  });
};

// 查询附件列表
export const accessoryList_cial = (params) => {
  return request({
    url: "/fundmanage/fundAcc/accessoryList/"+params,
    method: "post",
    //   headers: { "Content-Type": "application/json" },
  });
};

// 逻辑删除附件
export const accessoryList_delete = (params) => {
  return request({
    url: "/fundmanage/fundAcc/delete/"+params,
    method: "post",
    //   headers: { "Content-Type": "application/json" },
  });
};

// 下载附件
export const download_cial = (params) => {
  return request({
    url: "/fundmanage/fundAcc/download",
    method: "post",
    data:params
    //   headers: { "Content-Type": "application/json" },
  });
};


// 经费单别编号列表
export const categorylist_cial = () => {
  return request({
    url: "/fundmanage/fc/ordCategoryList/2",
    method: "post",
    // data:params
    //   headers: { "Content-Type": "application/json" },
  });
};

